﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class FactoryManager  {

    private static IAssetFactory assetFactory = null;
    private static ICharactorFactory enemyFactory = null;
    private static ICharactorFactory soldierFactory = null;
    private static IWeaponFactory weaponFactory = null;

    public static IAssetFactory AssetFactory {
        get
        {
            if (assetFactory == null)
                assetFactory = new ResourcesAssetFactory();
            return assetFactory;
        } }

    public static ICharactorFactory EnemyFactory
    {
        get
        {
            if (enemyFactory == null)
                enemyFactory = new EnemyFactory();
            return enemyFactory;
        }
    }
    public static ICharactorFactory SoldierFactory
    {
        get
        {
            if (soldierFactory == null)
                soldierFactory = new SoldierFactory();
            return soldierFactory;                          
        }
    }

    public static IWeaponFactory WeaponFactory
    {
        get
        {
            if (weaponFactory == null)
                weaponFactory = new WeaponFactory();
            return weaponFactory;
        }
    }
}
